package com.yoki.loginview.doWork;

import android.app.Activity;
import android.database.Cursor;
import android.os.Bundle;
import android.util.Log;
import android.widget.TextView;

import com.yoki.loginview.R;
import com.yoki.loginview.db.AccountDBHelper;

public class watchNvActivity extends Activity {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_watch);

        String Text="";
        TextView textView = findViewById(R.id.NameView);

        AccountDBHelper helper = new AccountDBHelper(watchNvActivity.this,AccountDBHelper.VERSION_1);
        Cursor cursor = helper.select("gender = '女'",null);
        cursor.moveToFirst();
        for(int i=0;i<cursor.getCount();i++)
        {
            Log.e("main",cursor.getString(1));
            Text+=cursor.getString(1) + "\n";
            cursor.moveToNext();
        }
        textView.setText(Text);

    }
}
